export function mul(arg1, arg2) {
  let digits = 0,
    s1 = arg1.toString(),
    s2 = arg2.toString();
  try {
    digits += s1.split(".")[1].length;
  } catch (e) {
    // console.log(e);
  }

  try {
    digits += s2.split(".")[1].length;
  } catch (e) {
    // console.log(e);
  }

  return Number((s1.replace(".", "") * Number(s2.replace(".", ""))) / Math.pow(10, digits));
}
export function toFixed(value) {
  if (value) {
    value = parseFloat(value);
    return value.toFixed(2);
  } else {
    return 0;
  }
}
